#include <iostream>
#include <string>
#include <vector>

using namespace std;

void Rtrim(char* string) {
    size_t len = 0;
    if (string == NULL) return;
    len = strlen(string);
    while (len>0 && string[len-1]==' ') {
        string[--len] = 0;
    }
    return;
}

int main() {
    char* tt = "asdzxc";
    printf("sizeof string %s: %d\n", tt, sizeof(tt));
    Rtrim(tt);
    printf("sizeof string %s: %d\n", tt, sizeof(tt));

    return 0;
}
